<template>
	<view class="main">

		<u-navbar :is-back="false" title="设置" title-size="40">
		</u-navbar>
		
		<u-modal v-model="show" title="意见反馈">
			<view class="slot-content">
				<rich-text :nodes="content"></rich-text>
			</view>
		</u-modal>
		
		<u-toast ref="uToast" />
		
		<!-- 情况所有信息警告 -->
		<u-modal v-model="errorShow" title="警告" content="是否清除所有信息,此操作不可逆！" show-cancel-button @confirm="delAll"></u-modal>
		
		<u-grid :col="2">
				<u-grid-item>
					<u-icon name="account" :size="46"></u-icon>
					<view class="grid-text">登录</view>
				</u-grid-item>
				<u-grid-item>
					<u-icon name="lock" :size="46"></u-icon>
					<view class="grid-text">检查更新</view>
				</u-grid-item>
				<u-grid-item v-on:click="idea">
					<u-icon name="bookmark" :size="46"></u-icon>
					<view class="grid-text">意见反馈</view>
				</u-grid-item>
				<u-grid-item @click="errorShow=true">
					<u-icon name="trash" :size="46"></u-icon>
					<view class="grid-text">清空数据</view>
				</u-grid-item>
			</u-grid>
			
			<view  style="text-align: center; margin-top: 200rpx">
				<u-icon name="android-fill" size="500"></u-icon>
			</view>
			
			<view style="text-align: center; font-size: 2rpx; color: #c1bebf;">作者：AICHI</view>

	</view>
</template>

<script>
	import {
		removeAllInfo,
	} from "@/api/info";
	export default {
		components: {
		},
		data() {
			return {
				show: false,
				errorShow: false,
				content: `
					作者：AICHI<br>
					微信：AICHI_enjun<br>
					邮箱：1021217094@qq.com
				`
			}
		},
		methods: {
			idea() {
				this.show = true;
			},
			quit() {
				plus.runtime.quit();
			},
			// 清空灭火器信息
			delAll() {
				removeAllInfo();
				this.$refs.uToast.show({
					title: "数据清除成功！",
					type: "success",
					position: "top",
				});
			}
		}
	}
</script>

<style lang="less">
	.main {
		.grid-text {
			font-size: 28rpx;
			margin-top: 4rpx;
		}
		
		.slot-content {
			font-size: 28rpx;
			padding-left: 100rpx;
		}
	}
</style>
